import {
    instance
} from "@/utils";

/**
 * 签到规则
 * @param {*} data
 * @returns
 */
export async function signRegulationApi(data) {
    return instance.request({
        url: "/sign/getSignRegulation",
        method: "post",
        data, custom: {
            auth: true,
        },
    });
}

/**
 * 签到奖励
 * @param {*} data
 * @returns
 */
export async function signLevelListApi(data) {
    return instance.request({
        url: "/sign/getSignLevelList",
        method: "post",
        data, custom: {
            auth: true,
        },
    });
}


/**
 * 查询今日是否已签到
 * @param {*} data
 * @returns
 */
export async function signStatusApi(data) {
    return instance.request({
        url: "/sign/getSignStatus",
        method: "post",
        custom: {
            auth: true,
        },
    });
}

/**
 * 查询签到记录 按月份
 * @param {*} data {{
"month":"2023-03"
}}
 * @returns
 */
export async function signRecordListApi(data) {
    return instance.request({
        url: "/sign/getSignRecordList",
        method: "post",
        data, custom: {
            auth: true,
        },
    });
}

/**
 * 今日签到
 * @param {*} data
 * @returns
 */
export async function signApi(data) {
    return instance.request({
        url: "/sign/sign",
        method: "post",
        data, custom: {
            auth: true,
        },
    });
}


/**
 * 获取签到海报
 * @param {*} data
 * @returns
 */
export async function getSignShareCodeApi(data = {}) {
    return instance.request({
        url: "/sign/getSignShareCode",
        method: "post",
        data,
        custom: {
            auth: true,
        },
    });
}


